﻿using AwesomeChromeFormUI.ChromiumForms;
using System.Windows.Forms;

namespace AwesomeChromeFormUI.App
{
    public class CefAppImpl : CefApp
    {
        /// <summary>
        /// 创建主窗口
        /// </summary>
        /// <returns></returns>
        protected override IMainView CreateMainView()
        {
            return new MainViewImpl(this);
        }
        /// <summary>
        /// 初始化应用
        /// </summary>
        protected override void PlatformInitialize()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
        }
        /// <summary>
        /// 退出应用
        /// </summary>
        protected override void PlatformQuitMessageLoop()
        {
            Application.Exit();
        }
        /// <summary>
        /// 应用主循环
        /// </summary>
        protected override void PlatformRunMessageLoop()
        {
            Application.Run();
        }
        /// <summary>
        /// 关闭应用
        /// </summary>
        protected override void PlatformShutdown()
        {

        }
    }
}
